// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "Camera/PlayerCameraManager.h"

#include "LyraPlayerCameraManager.generated.h"

class FDebugDisplayInfo;
class UCanvas;
class UObject;


#define LYRA_CAMERA_DEFAULT_FOV			(80.0f) // 默认视野
#define LYRA_CAMERA_DEFAULT_PITCH_MIN	(-89.0f) // 默认最小俯仰角
#define LYRA_CAMERA_DEFAULT_PITCH_MAX	(89.0f) // 默认最大俯仰角

class ULyraUICameraManagerComponent;

/**
 * ALyraPlayerCameraManager
 *
 *	该项目使用的基础玩家相机管理器类。
 */
UCLASS(notplaceable, MinimalAPI)
class ALyraPlayerCameraManager : public APlayerCameraManager
{
	GENERATED_BODY()

public:

	ALyraPlayerCameraManager(const FObjectInitializer& ObjectInitializer);

	ULyraUICameraManagerComponent* GetUICameraComponent() const; // 获取UI相机组件

protected:

	virtual void UpdateViewTarget(FTViewTarget& OutVT, float DeltaTime) override; // 更新视角目标

	virtual void DisplayDebug(UCanvas* Canvas, const FDebugDisplayInfo& DebugDisplay, float& YL, float& YPos) override; // 显示调试信息

private:
	/** UI相机组件，当UI执行某些重要操作且游戏玩法没有优先权时控制相机。 */
	UPROPERTY(Transient)
	TObjectPtr<ULyraUICameraManagerComponent> UICamera; // UI相机组件
};